package com.rimi.bbs.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author jerry
 * @since 2019-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Replies implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "replies_id",type = IdType.AUTO)
    private Integer repliesId;

    private Integer cardId;

    private Integer userId;

    private String repliesContent;

    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime repliesTime;

    private Integer repliesPraiseNumber;

    /**
     * 1未采纳 2采纳
     */
    private Integer repliesStatus;

    @JsonIgnore
    @TableField(exist = false)
    private User user;

    @JsonIgnore
    @TableField(exist = false)
    private String cardTitle;

}
